From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj@www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root@localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root@localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root@localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root@localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root@localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root@localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj@www.linux.org.uk ===== Ewan Harrow ewan@harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj@www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0001.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root@localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root@localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root@localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root@localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0001.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root@localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root@localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj@www.linux.org.uk ===== Ewan Harrow ewan@harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj@www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0002.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root@localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root@localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root@localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root@localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0002.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root@localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root@localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj@www.linux.org.uk ===== Ewan Harrow ewan@harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0003.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0003.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0004.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0004.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0005.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0005.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0006.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0006.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0007.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0007.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0008.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0008.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0009.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0009.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0010.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0010.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0011.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0011.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0012.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0012.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0013.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0013.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0014.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0014.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0015.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0015.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0016.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0016.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0017.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0017.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0018.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0018.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0019.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0019.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0020.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0020.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0021.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0021.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0022.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0022.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0023.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0023.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0024.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0024.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0025.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0025.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0026.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0026.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0027.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0027.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0028.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0028.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0029.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0029.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0030.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0030.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0031.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0031.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0032.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0032.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0033.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0033.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0034.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0034.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0035.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0035.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0036.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0036.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0037.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0037.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0038.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0038.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0039.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0039.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0040.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0040.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0041.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0041.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0042.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0042.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0043.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0043.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0044.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0044.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0045.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0045.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0046.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0046.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0047.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0047.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0048.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0048.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0049.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0049.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0050.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0050.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0051.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0051.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0052.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0052.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0053.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0053.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0054.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0054.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0055.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0055.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0056.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0056.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0057.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0057.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0058.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0058.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0059.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0059.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0060.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0060.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0061.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0061.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0062.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0062.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0063.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0063.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0064.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0064.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0065.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0065.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0066.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0066.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0067.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0067.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0068.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0068.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0069.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0069.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0070.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0070.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0071.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0071.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0072.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0072.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0073.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0073.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0074.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0074.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0075.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0075.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0076.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0076.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0077.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0077.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0078.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0078.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0079.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0079.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0080.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0080.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0081.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0081.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0082.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0082.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0083.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0083.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0084.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0084.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0085.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0085.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0086.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0086.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0087.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0087.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0088.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0088.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0089.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0089.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0090.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0090.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0091.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0091.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0092.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0092.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0093.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0093.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0094.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0094.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0095.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0095.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0096.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0096.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0097.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0097.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0098.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0098.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0099.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0099.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0100.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0100.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0101.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0101.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0102.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0102.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0103.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0103.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0104.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0104.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0105.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0105.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0106.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0106.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0107.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0107.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0108.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0108.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0109.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0109.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0110.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0110.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0111.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0111.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0112.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0112.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0113.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0113.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0114.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0114.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0115.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0115.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0116.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0116.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0117.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0117.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0118.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0118.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0119.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0119.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0120.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0120.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0121.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0121.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0122.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0122.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0123.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0123.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0124.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0124.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0125.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0125.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0126.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0126.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0127.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0127.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0128.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0128.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0129.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0129.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0130.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0130.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0131.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0131.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0132.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0132.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0133.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0133.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0134.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0134.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0135.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0135.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0136.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0136.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0137.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0137.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0138.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0138.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0139.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0139.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0140.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0140.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0141.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0141.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0142.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0142.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0143.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0143.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0144.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0144.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0145.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0145.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0146.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0146.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0147.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0147.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0148.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0148.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0149.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0149.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0150.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0150.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0151.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0151.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0152.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0152.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0153.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0153.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0154.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0154.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0155.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0155.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0156.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0156.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0157.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0157.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0158.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0158.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0159.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0159.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0160.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0160.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0161.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0161.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0162.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0162.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0163.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0163.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0164.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0164.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0165.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0165.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0166.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0166.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0167.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0167.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0168.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0168.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0169.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0169.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0170.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0170.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0171.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0171.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0172.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0172.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0173.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0173.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0174.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0174.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0175.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0175.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0176.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0176.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0177.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0177.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0178.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0178.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0179.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0179.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0180.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0180.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0181.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0181.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0182.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0182.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0183.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0183.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0184.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0184.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0185.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0185.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0186.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0186.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0187.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0187.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0188.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0188.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0189.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0189.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0190.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0190.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0191.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0191.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0192.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0192.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0193.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0193.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0194.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0194.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0195.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0195.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0196.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0196.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0197.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0197.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0198.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0198.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0199.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0199.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0200.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0200.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0201.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0201.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0202.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0202.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0203.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0203.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0204.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0204.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0205.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0205.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0206.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0206.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0207.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0207.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does corre